import Vue from 'vue'
import App from './App'
import request from '@/common/request.js'
import test from './common/test.js'
import store from './store'
import customNav from '@/components/custom-nav/custom-nav.vue'
import uView from '@/uni_modules/uview-ui'
// 配置公共方法
import common from './common/common.js'
Vue.use(uView);
Vue.prototype.$noMultipleClicks = common.noMultipleClicks
Vue.prototype.$isNotEmpty = function (obj) {
	return obj !== undefined && obj !== null && obj !== '' && obj !== 'null'
}
Vue.component('custom-nav', customNav)
Vue.prototype.$test = test
Vue.prototype.$request = request
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
	...App,
})
let onFun = uni.$on
uni.$on = (eventName, obj) => {
	try {
		uni.$off(eventName)
	} catch (e) {
		console.log(e)
	}
	onFun(eventName, obj)
}
app.$mount()
